package com.cys.dm.controller;

import com.cys.dm.entity.base.DmImage;
import com.cys.dm.entity.item.DmItemType;
import com.cys.dm.rest.service.DmImageService;
import com.cys.dm.rest.service.DmItemTypeService;
import com.cys.dm.vo.CommonResponse;
import com.cys.dm.vo.dmitem.DmItemTypeResponse;
import com.cys.dm.vo.dmitem.FloorResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class DmItemTypeController {

    @Resource
    private DmItemTypeService dmItemTypeService;
    @Resource
    private DmImageService dmImageService;

    @PostMapping(path = "/nav")
    public CommonResponse<List<DmItemTypeResponse>> nav(){
        return dmItemTypeService.nav();
    }

    @PostMapping(path = "/lineNav")
    public CommonResponse<List<DmItemType>> lineNav(){
        return dmItemTypeService.lineNav();
    }

    /**
     * 轮播图
     */
    @PostMapping(path = "/carousel")
    public CommonResponse<List<DmImage>> carousel(){
        return dmImageService.carousel();
    }

    /**
     * 楼层
     */
    @PostMapping(path = "/floor")
    public CommonResponse<List<FloorResponse>> floor(){
        return dmItemTypeService.floor();
    }

}
